﻿<sap:ActivityDesigner x:Class="BioWF.Activities.Design.CreateSequenceDesigner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation"
    xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation"
    xmlns:converters="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation"
    xmlns:system="clr-namespace:System;assembly=mscorlib">

    <sap:ActivityDesigner.Icon>
        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="16,16" ></Rect>
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="Images/create_sequence.png" />
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>

    <StackPanel>
        <StackPanel.Resources>
            <converters:ArgumentToExpressionConverter x:Key="argToExpression" />
            <Style TargetType="TextBlock">
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="Margin" Value="5" />
                <Setter Property="VerticalAlignment" Value="Center" />
            </Style>
        </StackPanel.Resources>

        <TextBlock Text="Desired Alphabet" />
        <ComboBox x:Name="cbAlphabet" Margin="5" 
                  SelectedItem="{Binding ModelItem.AlphabetName, Mode=TwoWay}" />

        <TextBlock Text="ID (optional)" />
        <TextBox Margin="5" Text="{Binding ModelItem.ID, Mode=TwoWay}" />

        <TextBlock Text="Sequence Data" />
        <sapv:ExpressionTextBox Margin="5"
                                ExpressionType="system:String"
                                OwnerActivity="{Binding ModelItem}"
                                Expression="{Binding ModelItem.SequenceData, Mode=TwoWay, Converter={StaticResource argToExpression}}"
                                HintText="Data used to create sequence"/>
        
    </StackPanel>
    
</sap:ActivityDesigner>
